<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/css/sub-page.css">
    <style>
        #apply{
            color: #f00;
            display: inline-block;
            margin-left: 5px;
            margin-right: 5px;
        }
    </style>
</head>
<body style="background: #f0f0f0">
    <div  class="ok-body">
        <div class="layui-card">
            <div class="layui-card-header">待办事项</div>
            <div class="layui-card-body">
                您共有<a href="javascript:void(0)" id="schedule"> <span id="apply"></span></a>条入学申请未处理
            </div>
        </div>

        <div class="layui-card">
            <div class="layui-card-header">快捷入口</div>
            <div class="layui-card-body">
                <div class="layui-btn-container">
                    <button class="layui-btn btn-shortcut" lay-id="5-1" data-url="/manage/culture/news.html">学院新闻管理</button>
                    <button class="layui-btn btn-shortcut" lay-id="4" data-url="/manage/teacher/index.html">师资管理</button>
                    <button class="layui-btn btn-shortcut" lay-id="5-2" data-url="/manage/culture/activity.html">活动管理</button>
                    <button class="layui-btn btn-shortcut" lay-id="5-3" data-url="/manage/culture/competition.html">竞赛管理</button>
                    <button class="layui-btn btn-shortcut" lay-id="5-4" data-url="/manage/culture/production.html">作品管理</button>
                    <button class="layui-btn btn-shortcut" lay-id="2-4" data-url="/manage/school/environment.html">环境管理</button>
                </div>
            </div>
        </div>
    </div>
<script src="../lib/layui/layui.js"></script>
<script>
    layui.use(['element','okTab','jquery'],function () {
        var $ = layui.jquery;
        let okTab = layui.okTab();
        $.get('/manage/applies?status=0',function (resp) {
            $('#apply').html(resp.count)
        })

      $('#schedule').click(function () {
          var url ="/manage/recruit/apply.html";
          var page = '<div lay-id="6-2" data-url="' + url + '"><cite>在线报名</cite></div>';
          okTab.tabAdd(page);
      })

        $('.btn-shortcut').click(function () {
            okTab.tabAdd(this);
        })
    })



</script>
</body>
</html>